home *** CD-ROM | disk | FTP | other *** search
- /*
- File: BTEqu.h
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #ifndef __BTEQU__
- #define __BTEQU__
-
- #ifndef __FILES__
- #include <files.h>
- #endif
-
- #define caseSens 0x10 /* case sensitive = 16 */
- #define diacNsens 0x20 /* diac not sensitive = 32 */
-
- /* key descriptor */
- #define kdSkip 0
- #define kdByte 1 /* unsigned */
- #define kdWord 4 /* unsigned */
- #define kdLong 6 /* unsigned */
- #define kdSignedByte 2 /* signed */
- #define kdSignedWord 5 /* signed */
- #define kdSignedLong 7 /* signed */
- #define kdString 3
- #define kdFLString 8 /* fixed length string */
- #define kdDTString 9 /* replace default key for DTDB */
- #define kdUseKCProc 10 /* always uses key comparison procedure <28Mar90> */
-
- typedef struct BTParam {
- ParamBlockHeader
- short ioRefNum; /* 24 */
- short ioBTNodeSize; /* 26 */
- short ioBTMaxKLen; /* 28 */
- short ioBTDepth; /* 30 */
- long ioBTRecNum; /* 32 */
- long ioBTNNodes; /* 36 */
- long ioBTFreeNode; /* 40 */
- long ioBTClumpSize; /* 44 */
- long ioDirID; /* 48 */
- Ptr ioBTKDPtr; /* 52 */
- short ioBTKDReqCount; /* 56 */
- short ioBTKDActCount; /* 58 */
- } BTParam;
-
- typedef struct BTIOParam {
- ParamBlockHeader
- short ioRefNum; /* 24 */
- char ioBTWriteFlag; /* 26 used by BTFlush only */
- char ioPermssn; /* 27 */
- Ptr ioMisc; /* 28 */
- Ptr ioBuffer; /* 32 */
- long ioReqCount; /* 36 */
- long ioActCount; /* 40 */
- Ptr ioBTKeyPtr; /* 44 */
- long ioDirID; /* 48 don't move above this */
- long ioBTHint1; /* 52 */
- long ioBTHint2; /* 56 */
- short ioBTHint3; /* 60 */
- short ioBTHint4; /* 62 reserved */
- long ioBTHint5; /* 64 reserved */
- short ioBTPosMode; /* 68 */
- short ioKReqCount; /* 70 */
- short ioKActCount; /* 72 */
- long ioBTRsrvUID; /* 74 */
- long ioBTDataSize; /* 78 */
- Ptr ioBTKCProc; /* 82 */ /* only used by BTOpen, this will override KD */
- } BTioParam;
-
-
- #define kdMaxLen 24
- #define MaxKeyLen 129 /* doesn't include length byte */
-
- /* error code */
- #define notBTree -410
- #define btBadNode -411
- #define btSizeErr -412
- #define btNoSpace -413
- #define btDupRecErr -414
- #define btRecNotFnd -415
- #define btKeyLenErr -416
- #define btKeyAttrErr -417
- #define btKeyFdErr -418
- #define btPMInvalid -419
- #define btKDLenErr -420
- #define btKDTypeErr -421
- #define btBadUIDErr -422
-
- #define btNoKDErr -424 /* no key descriptor in the header */
- #define btDepthErr -425 /* tree depth > maxDepth <04Apr90> */
- #define btNoKCProcErr -426 /* no Key Comp procedure error <28Mar90> */
- #define btVersionErr -427 /* Btree version error (for future release) */
- #define btEofErr -428 /* BTGetRec reading beyond EOF */
- #define btBofErr -429 /* BTGetRec reading before BOF */
-
- pascal short BTInit (BTParam *btparam, short async);
- pascal short BTOpen (BTioParam *btioparam, short async);
- pascal short BTClose (BTioParam *btioparam, short async);
- pascal short BTInsRec (BTioParam *btioparam, short async);
- pascal short BTSetRec (BTioParam *btioparam, short async);
- pascal short BTReplRec (BTioParam *btioparam, short async);
- pascal short BTSearch (BTioParam *btioparam, short async);
- pascal short BTGetRec (BTioParam *btioparam, short async);
- pascal short BTDelete (BTioParam *btioparam, short async);
- pascal short BTGetInfo (BTParam *btparam, short async);
- pascal short BTFlush (BTioParam *btioparam, short async);
- pascal short BTCleanUp (BTioParam *btioparam, short async);
- pascal short BTRsrvAccess(BTioParam *btioparam, short async);
- pascal short BTRelAccess (BTioParam *btioparam, short async);
- pascal short BTGetUid (BTioParam *btioparam, short async);
- pascal short BTUpdateKD (BTParam *btparam, short async);
-
- #endif // __BTEQU__
-